<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Tolc: app/common/utils.php File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../tolc_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tolc
   &#160;<span id="projectnumber">v 1.00</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d8/dfd/utils_8php.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">utils.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="../../d8/dfd/utils_8php_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af4a2ee0fcc1938603a0df8cb02e51fbd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#af4a2ee0fcc1938603a0df8cb02e51fbd">now</a> ($str_user_timezone, $str_server_timezone=<a class="el" href="../../d6/d75/init_8php.html#af848a01fa4e501e85d808d97709b2d46">CONST_SERVER_TIMEZONE</a>, $str_server_dateformat=<a class="el" href="../../d6/d75/init_8php.html#a33e5075d3459f85a4eb4572cb019745f">CONST_SERVER_DATEFORMAT</a>)</td></tr>
<tr class="separator:af4a2ee0fcc1938603a0df8cb02e51fbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a741e472b16682ea77137ca19054c17b8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#a741e472b16682ea77137ca19054c17b8">date_decode</a> ($str_server_datetime, $str_user_timezone, $str_user_dateformat)</td></tr>
<tr class="separator:a741e472b16682ea77137ca19054c17b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06e96ccdcb8d9d23fdf1957d17276a72"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#a06e96ccdcb8d9d23fdf1957d17276a72">date_encode</a> ($str_user_datetime, $str_user_timezone, $str_user_dateformat, $str_server_timezone=<a class="el" href="../../d6/d75/init_8php.html#af848a01fa4e501e85d808d97709b2d46">CONST_SERVER_TIMEZONE</a>, $str_server_dateformat=<a class="el" href="../../d6/d75/init_8php.html#a33e5075d3459f85a4eb4572cb019745f">CONST_SERVER_DATEFORMAT</a>, $str_safe_dateformat_strtotime=<a class="el" href="../../d6/d75/init_8php.html#a35f182c412b1dcc567444edf5954583f">CONST_SAFE_DATEFORMAT_STRTOTIME</a>)</td></tr>
<tr class="separator:a06e96ccdcb8d9d23fdf1957d17276a72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7f6c70b3d50bef108c5592f795c122e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#ab7f6c70b3d50bef108c5592f795c122e">get_time_offset</a> ($str_datetime, $str_timezone)</td></tr>
<tr class="separator:ab7f6c70b3d50bef108c5592f795c122e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81eae6dfa716bb01d32508a98d788343"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#a81eae6dfa716bb01d32508a98d788343">mb_str_ireplace</a> ($co, $naCo, $wCzym)</td></tr>
<tr class="separator:a81eae6dfa716bb01d32508a98d788343"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8824e380dac56ae7d19339d11b5d4ef"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#ac8824e380dac56ae7d19339d11b5d4ef">tz_list</a> ()</td></tr>
<tr class="separator:ac8824e380dac56ae7d19339d11b5d4ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9da7b934dfa651fe1bbc33651076dab7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#a9da7b934dfa651fe1bbc33651076dab7">df_list</a> ($a_df, $tz=<a class="el" href="../../d6/d75/init_8php.html#af848a01fa4e501e85d808d97709b2d46">CONST_SERVER_TIMEZONE</a>)</td></tr>
<tr class="separator:a9da7b934dfa651fe1bbc33651076dab7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5fc732d3ff0efbebfc32ac3cb5a5dd8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#ab5fc732d3ff0efbebfc32ac3cb5a5dd8">get_gravatar</a> ($email, $s=80, $d= 'mm', $r= 'g', $img=false, $atts=array())</td></tr>
<tr class="separator:ab5fc732d3ff0efbebfc32ac3cb5a5dd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9c7f83caac87d29d267fcf9d9894560"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#ab9c7f83caac87d29d267fcf9d9894560">get_gravatar_profile</a> ($email, $decode_url=false)</td></tr>
<tr class="separator:ab9c7f83caac87d29d267fcf9d9894560"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cdfd9f7d63c5ea6dcb7508a7884ef84"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#a3cdfd9f7d63c5ea6dcb7508a7884ef84">removeAccents</a> ($str)</td></tr>
<tr class="separator:a3cdfd9f7d63c5ea6dcb7508a7884ef84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adef31fd3c624e3d6eadcc5a15a682969"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#adef31fd3c624e3d6eadcc5a15a682969">sanitize_url</a> ($url, $url_length, $remove_accents=true, $convert_to_lower_case=true, $replace_space_between_words_with_dash=true)</td></tr>
<tr class="separator:adef31fd3c624e3d6eadcc5a15a682969"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc3d2aaaf8242b0db6211c72e955b7c8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#adc3d2aaaf8242b0db6211c72e955b7c8">valid_url</a> ($url, $str_regex, $str_regex_php_legacy)</td></tr>
<tr class="separator:adc3d2aaaf8242b0db6211c72e955b7c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaafe5bfeb6c88ccc33990612b77a2199"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfd/utils_8php.html#aaafe5bfeb6c88ccc33990612b77a2199">isValidDateTimeString</a> ($str_dt, $str_dateformat, $str_timezone)</td></tr>
<tr class="separator:aaafe5bfeb6c88ccc33990612b77a2199"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a741e472b16682ea77137ca19054c17b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">date_decode </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_server_datetime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_user_timezone</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_user_dateformat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts a UTC timestamp to date string of given timezone (considering DST) and given dateformat</p>
<p>DateTime requires PHP &gt;= 5.2</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str_server_datetime</td><td>Normally is a 14-digit UTC timestamp (YYYYMMDDHHMMSS). It can also be 8-digit (date), 12-digit (datetime without seconds). If given dateformat (<em>$str_user_dateformat</em>) is longer than <em>$str_server_datetime</em>, the missing digits of input value are filled with zero, so (YYYYMMDD is equivalent to YYYYMMDD000000 and YYYYMMDDHHMM is equivalent to YYYYMMDDHHMM00).</td></tr>
  </table>
  </dd>
</dl>
<p>It can also be 'now', null or empty string. In this case returns the current time.</p>
<p>Other values (invalid datetime strings) throw an error. Milliseconds are not supported.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$str_user_timezone</td><td></td></tr>
    <tr><td class="paramtype"></td><td class="paramname">$str_user_dateformat</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00051">51</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d7/da6/ajax__datetime__range_8php_source.html#l00035">$date</a>.</p>
<div class="fragment"><div class="line">                                                               {</div>
<div class="line"></div>
<div class="line">        <span class="comment">// create date object</span></div>
<div class="line">        <span class="keywordflow">try</span> {</div>
<div class="line">                <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> = <span class="keyword">new</span> DateTime($str_server_datetime);</div>
<div class="line">        } <span class="keywordflow">catch</span>(Exception $e) {</div>
<div class="line">                trigger_error(<span class="stringliteral">&#39;date_decode: Invalid datetime: &#39;</span> . $e-&gt;getMessage(), E_USER_ERROR);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="comment">// convert to user timezone</span></div>
<div class="line">        $userTimeZone = <span class="keyword">new</span> DateTimeZone($str_user_timezone);</div>
<div class="line">        <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;setTimeZone($userTimeZone);</div>
<div class="line"></div>
<div class="line">        <span class="comment">// convert to user dateformat</span></div>
<div class="line">        $str_user_datetime = <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;format($str_user_dateformat);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> $str_user_datetime;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a06e96ccdcb8d9d23fdf1957d17276a72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">date_encode </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_user_datetime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_user_timezone</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_user_dateformat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_server_timezone</em> = <code><a class="el" href="../../d6/d75/init_8php.html#af848a01fa4e501e85d808d97709b2d46">CONST_SERVER_TIMEZONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_server_dateformat</em> = <code><a class="el" href="../../d6/d75/init_8php.html#a33e5075d3459f85a4eb4572cb019745f">CONST_SERVER_DATEFORMAT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_safe_dateformat_strtotime</em> = <code><a class="el" href="../../d6/d75/init_8php.html#a35f182c412b1dcc567444edf5954583f">CONST_SAFE_DATEFORMAT_STRTOTIME</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts a date string of given timezone (considering DST) and format to 14-digit UTC timestamp (YYYYMMDDHHMMSS)</p>
<p>DateTime::createFromFormat requires PHP &gt;= 5.3</p>
<p><b>Note about strtotime</b>: Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.</p>
<p>To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates or DateTime::createFromFormat() when possible.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str_user_datetime</td><td><em>$str_user_timezone</em> and <em>$str_user_dateformat</em> must match. Otherwise error occurs.</td></tr>
  </table>
  </dd>
</dl>
<p>If <em>$str_server_dateformat</em> is longer than <em>$str_user_dateformat</em>, the missing time digits filled with zero, but if all times digits are missing current time is returned.</p>
<p>Other values (invalid datetime strings) throw an error. Milliseconds are not supported.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"></td><td class="paramname">$str_user_timezone</td><td></td></tr>
    <tr><td class="paramtype"></td><td class="paramname">$str_user_dateformat</td><td></td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$str_server_timezone</td><td></td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$str_server_dateformat</td><td></td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$str_safe_dateformat_strtotime</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string</dd></dl>
<p><a class="el" href="../../"><a href="http://stackoverflow.com/questions/4163641/php-using-strtotime-with-a-uk-date-format-dd-mm-yy">http://stackoverflow.com/questions/4163641/php-using-strtotime-with-a-uk-date-format-dd-mm-yy</a>  <a href="http://derickrethans.nl/british-date-format-parsing.html">http://derickrethans.nl/british-date-format-parsing.html</a> </a></p>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00103">103</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d7/da6/ajax__datetime__range_8php_source.html#l00035">$date</a>.</p>
<div class="fragment"><div class="line">                                                                                                           {</div>
<div class="line"></div>
<div class="line">        <span class="comment">// set timezone to user timezone</span></div>
<div class="line">        date_default_timezone_set($str_user_timezone);</div>
<div class="line"></div>
<div class="line">        <span class="comment">// create date object using any given format</span></div>
<div class="line">        <span class="keywordflow">if</span>($str_user_datetime == <span class="stringliteral">&#39;now&#39;</span> || !$str_user_datetime) {</div>
<div class="line">                <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> = <span class="keyword">new</span> DateTime(<span class="stringliteral">&#39;&#39;</span>, <span class="keyword">new</span> DateTimeZone($str_user_timezone));</div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">                <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> = DateTime::createFromFormat($str_user_dateformat, $str_user_datetime, <span class="keyword">new</span> DateTimeZone($str_user_timezone));</div>
<div class="line">                <span class="keywordflow">if</span>(<a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> === <span class="keyword">false</span>) {</div>
<div class="line">                        trigger_error(<span class="stringliteral">&#39;date_encode: Invalid date&#39;</span>, E_USER_ERROR);</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="comment">// convert given datetime to safe format for strtotime</span></div>
<div class="line">        $str_user_datetime = <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;format($str_safe_dateformat_strtotime);</div>
<div class="line"></div>
<div class="line">        <span class="comment">// convert to UTC</span></div>
<div class="line">        $str_server_datetime = gmdate($str_server_dateformat, strtotime($str_user_datetime));</div>
<div class="line"></div>
<div class="line">        <span class="comment">// return timezone to server default</span></div>
<div class="line">        date_default_timezone_set($str_server_timezone);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> $str_server_datetime;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9da7b934dfa651fe1bbc33651076dab7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">df_list </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$a_df</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$tz</em> = <code><a class="el" href="../../d6/d75/init_8php.html#af848a01fa4e501e85d808d97709b2d46">CONST_SERVER_TIMEZONE</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create dateformat array</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$a_df</td><td></td></tr>
    <tr><td class="paramname">$tz</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00195">195</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d7/da6/ajax__datetime__range_8php_source.html#l00035">$date</a>.</p>
<div class="fragment"><div class="line">                                                     {</div>
<div class="line">        $df_array = array();</div>
<div class="line">        $tz = <span class="keyword">new</span> DateTimeZone($tz);</div>
<div class="line">        <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> = <span class="keyword">new</span> DateTime(<span class="stringliteral">&#39;&#39;</span>);</div>
<div class="line">        <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;setTimeZone($tz);</div>
<div class="line">        <span class="keywordflow">foreach</span>($a_df as $df_key =&gt; $df_val) {</div>
<div class="line">                $df = $df_val[<span class="stringliteral">&#39;php_datetime&#39;</span>];</div>
<div class="line">                $df_example = <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;format($df);</div>
<div class="line">                $df_array[$df_key] = array(<span class="stringliteral">&#39;dateformat&#39;</span> =&gt; $df, <span class="stringliteral">&#39;example&#39;</span> =&gt; $df_example);</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> $df_array;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab5fc732d3ff0efbebfc32ac3cb5a5dd8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_gravatar </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$email</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$s</em> = <code>80</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$d</em> = <code>'mm'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$r</em> = <code>'g'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$img</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$atts</em> = <code>array()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get either a Gravatar URL or complete image tag for a specified email address.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$email</td><td>The email address </td></tr>
    <tr><td class="paramtype">int&#160;|&#160;string</td><td class="paramname">$s</td><td>Size in pixels, defaults to 80px [ 1 - 2048 ] </td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$d</td><td>Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] </td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$r</td><td>Maximum rating (inclusive) [ g | pg | r | x ] </td></tr>
    <tr><td class="paramtype">bool&#160;|&#160;\boole</td><td class="paramname">$img</td><td>True to return a complete IMG tag False for just the URL </td></tr>
    <tr><td class="paramtype">array</td><td class="paramname">$atts</td><td>Optional, additional key/value attributes to include in the IMG tag </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String containing either just a URL or a complete image tag <a class="el" href="../../">http://gravatar.com/site/implement/images/php/</a></dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00220">220</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../db/ded/ajax__user_8php_source.html#l00036">$email</a>, and <a class="el" href="../../db/ded/ajax__user_8php_source.html#l00037">$url</a>.</p>
<div class="fragment"><div class="line">                                                                                           {</div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = <span class="stringliteral">&#39;http://www.gravatar.com/avatar/&#39;</span>;</div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> .= md5(strtolower(trim(<a class="code" href="../../db/ded/ajax__user_8php.html#ad634f418b20382e2802f80532d76d3cd">$email</a>)));</div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> .= <span class="stringliteral">&quot;?s=$s&amp;d=$d&amp;r=$r&quot;</span>;</div>
<div class="line">        <span class="keywordflow">if</span>($img) {</div>
<div class="line">                <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = <span class="stringliteral">&#39;&lt;img src=&quot;&#39;</span> . <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> . <span class="charliteral">&#39;&quot;&#39;</span>;</div>
<div class="line">                <span class="keywordflow">foreach</span>($atts as $key =&gt; $val)</div>
<div class="line">                        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> .= <span class="charliteral">&#39; &#39;</span> . $key . <span class="stringliteral">&#39;=&quot;&#39;</span> . $val . <span class="charliteral">&#39;&quot;&#39;</span>;</div>
<div class="line">                <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> .= <span class="stringliteral">&#39; /&gt;&#39;</span>;</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab9c7f83caac87d29d267fcf9d9894560"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_gravatar_profile </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$email</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$decode_url</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get Gravatar profile url</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"></td><td class="paramname">$email</td><td></td></tr>
    <tr><td class="paramtype">bool</td><td class="paramname">$decode_url</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string <a class="el" href="../../">https://en.gravatar.com/site/implement/profiles/php/</a></dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00241">241</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../db/ded/ajax__user_8php_source.html#l00036">$email</a>, and <a class="el" href="../../db/ded/ajax__user_8php_source.html#l00037">$url</a>.</p>
<div class="fragment"><div class="line">                                                           {</div>
<div class="line">        $url_encoded = <span class="stringliteral">&#39;http://www.gravatar.com/&#39;</span> . md5(strtolower(trim(<a class="code" href="../../db/ded/ajax__user_8php.html#ad634f418b20382e2802f80532d76d3cd">$email</a>)));</div>
<div class="line">        <span class="keywordflow">if</span>(!$decode_url) {</div>
<div class="line">                <span class="keywordflow">return</span> $url_encoded;</div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">                <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = $url_encoded . <span class="stringliteral">&#39;.php&#39;</span>;</div>
<div class="line">                $str = file_get_contents(<a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>);</div>
<div class="line">                <span class="keywordflow">if</span>($str === <span class="keyword">false</span>) {</div>
<div class="line">                        <span class="keywordflow">return</span> $url_encoded;</div>
<div class="line">                } <span class="keywordflow">else</span> {</div>
<div class="line">                        $profile = unserialize($str);</div>
<div class="line">                        <span class="keywordflow">if</span>(is_array($profile) &amp;&amp; isset($profile[<span class="stringliteral">&#39;entry&#39;</span>])) {</div>
<div class="line">                                <span class="keywordflow">return</span> $profile[<span class="stringliteral">&#39;entry&#39;</span>][0][<span class="stringliteral">&#39;profileUrl&#39;</span>];</div>
<div class="line">                        } <span class="keywordflow">else</span> {</div>
<div class="line">                                <span class="keywordflow">return</span> $url_encoded;</div>
<div class="line">                        }</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab7f6c70b3d50bef108c5592f795c122e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_time_offset </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_datetime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_timezone</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the offset (in seconds) from UTC of a given timezone timestring (considering DST)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str_datetime</td><td></td></tr>
    <tr><td class="paramname">$str_timezone</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00142">142</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d2/d1b/ajax__regional_8php_source.html#l00017">$timezone</a>.</p>
<div class="fragment"><div class="line">                                                       {</div>
<div class="line">        <a class="code" href="../../d2/d1b/ajax__regional_8php.html#af1cceca0f6633f202e2e3eccb72912af">$timezone</a> = <span class="keyword">new</span> DateTimeZone($str_timezone);</div>
<div class="line">        $offset = <a class="code" href="../../d2/d1b/ajax__regional_8php.html#af1cceca0f6633f202e2e3eccb72912af">$timezone</a>-&gt;getOffset(<span class="keyword">new</span> DateTime($str_datetime));</div>
<div class="line">        <span class="keywordflow">return</span> $offset;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aaafe5bfeb6c88ccc33990612b77a2199"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">isValidDateTimeString </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_dt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_dateformat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_timezone</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check if a string is a valid date(time)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str_dt</td><td></td></tr>
    <tr><td class="paramname">$str_dateformat</td><td></td></tr>
    <tr><td class="paramname">$str_timezone</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00335">335</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d7/da6/ajax__datetime__range_8php_source.html#l00035">$date</a>.</p>
<div class="fragment"><div class="line">                                                                        {</div>
<div class="line">        <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> = DateTime::createFromFormat($str_dateformat, $str_dt, <span class="keyword">new</span> DateTimeZone($str_timezone));</div>
<div class="line">        <span class="keywordflow">return</span> (<a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> === <span class="keyword">false</span> ? <span class="keyword">false</span> : <span class="keyword">true</span>);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a81eae6dfa716bb01d32508a98d788343"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mb_str_ireplace </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$co</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$naCo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$wCzym</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<ul>
<li>Multi-byte CASE INSENSITIVE str_replace</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$co</td><td></td></tr>
    <tr><td class="paramname">$naCo</td><td></td></tr>
    <tr><td class="paramname">$wCzym</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string <a class="el" href="../../">http://www.php.net/manual/en/function.mb-ereg-replace.php#55659</a></dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00157">157</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>
<div class="fragment"><div class="line">                                             {</div>
<div class="line">        $wCzymM = mb_strtolower($wCzym);</div>
<div class="line">        $coM = mb_strtolower($co);</div>
<div class="line">        $offset = 0;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">while</span>(!is_bool($poz = mb_strpos($wCzymM, $coM, $offset))) {</div>
<div class="line">                $offset = $poz + mb_strlen($naCo);</div>
<div class="line">                $wCzym = mb_substr($wCzym, 0, $poz) . $naCo . mb_substr($wCzym, $poz + mb_strlen($co));</div>
<div class="line">                $wCzymM = mb_strtolower($wCzym);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> $wCzym;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af4a2ee0fcc1938603a0df8cb02e51fbd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">now </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_user_timezone</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_server_timezone</em> = <code><a class="el" href="../../d6/d75/init_8php.html#af848a01fa4e501e85d808d97709b2d46">CONST_SERVER_TIMEZONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_server_dateformat</em> = <code><a class="el" href="../../d6/d75/init_8php.html#a33e5075d3459f85a4eb4572cb019745f">CONST_SERVER_DATEFORMAT</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts current time for given timezone (considering DST) to 14-digit UTC timestamp (YYYYMMDDHHMMSS)</p>
<p>DateTime requires PHP &gt;= 5.2</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"></td><td class="paramname">$str_user_timezone</td><td></td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$str_server_timezone</td><td></td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$str_server_dateformat</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00013">13</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d7/da6/ajax__datetime__range_8php_source.html#l00035">$date</a>.</p>
<div class="fragment"><div class="line">                                                                           {</div>
<div class="line"></div>
<div class="line">        <span class="comment">// set timezone to user timezone</span></div>
<div class="line">        date_default_timezone_set($str_user_timezone);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a> = <span class="keyword">new</span> DateTime(<span class="stringliteral">&#39;now&#39;</span>);</div>
<div class="line">        <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;setTimezone(<span class="keyword">new</span> DateTimeZone($str_server_timezone));</div>
<div class="line">        $str_server_now = <a class="code" href="../../d7/da6/ajax__datetime__range_8php.html#a481c918f8d853749e00b5942cabf599a">$date</a>-&gt;format($str_server_dateformat);</div>
<div class="line"></div>
<div class="line">        <span class="comment">// return timezone to server default</span></div>
<div class="line">        date_default_timezone_set($str_server_timezone);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> $str_server_now;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3cdfd9f7d63c5ea6dcb7508a7884ef84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">removeAccents </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>mixed <a class="el" href="../../">http://myshadowself.com/coding/php-function-to-convert-accented-characters-to-their-non-accented-equivalant/</a></dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00267">267</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>
<div class="fragment"><div class="line">                             {</div>
<div class="line">        $a = array(<span class="stringliteral">&#39;À&#39;</span>, <span class="stringliteral">&#39;Á&#39;</span>, <span class="stringliteral">&#39;Â&#39;</span>, <span class="stringliteral">&#39;Ã&#39;</span>, <span class="stringliteral">&#39;Ä&#39;</span>, <span class="stringliteral">&#39;Å&#39;</span>, <span class="stringliteral">&#39;Æ&#39;</span>, <span class="stringliteral">&#39;Ç&#39;</span>, <span class="stringliteral">&#39;È&#39;</span>, <span class="stringliteral">&#39;É&#39;</span>, <span class="stringliteral">&#39;Ê&#39;</span>, <span class="stringliteral">&#39;Ë&#39;</span>, <span class="stringliteral">&#39;Ì&#39;</span>, <span class="stringliteral">&#39;Í&#39;</span>, <span class="stringliteral">&#39;Î&#39;</span>, <span class="stringliteral">&#39;Ï&#39;</span>, <span class="stringliteral">&#39;Ð&#39;</span>, <span class="stringliteral">&#39;Ñ&#39;</span>, <span class="stringliteral">&#39;Ò&#39;</span>, <span class="stringliteral">&#39;Ó&#39;</span>, <span class="stringliteral">&#39;Ô&#39;</span>, <span class="stringliteral">&#39;Õ&#39;</span>, <span class="stringliteral">&#39;Ö&#39;</span>, <span class="stringliteral">&#39;Ø&#39;</span>, <span class="stringliteral">&#39;Ù&#39;</span>, <span class="stringliteral">&#39;Ú&#39;</span>, <span class="stringliteral">&#39;Û&#39;</span>, <span class="stringliteral">&#39;Ü&#39;</span>, <span class="stringliteral">&#39;Ý&#39;</span>, <span class="stringliteral">&#39;ß&#39;</span>, <span class="stringliteral">&#39;à&#39;</span>, <span class="stringliteral">&#39;á&#39;</span>, <span class="stringliteral">&#39;â&#39;</span>, <span class="stringliteral">&#39;ã&#39;</span>, <span class="stringliteral">&#39;ä&#39;</span>, <span class="stringliteral">&#39;å&#39;</span>, <span class="stringliteral">&#39;æ&#39;</span>, <span class="stringliteral">&#39;ç&#39;</span>, <span class="stringliteral">&#39;è&#39;</span>, <span class="stringliteral">&#39;é&#39;</span>, <span class="stringliteral">&#39;ê&#39;</span>, <span class="stringliteral">&#39;ë&#39;</span>, <span class="stringliteral">&#39;ì&#39;</span>, <span class="stringliteral">&#39;í&#39;</span>, <span class="stringliteral">&#39;î&#39;</span>, <span class="stringliteral">&#39;ï&#39;</span>, <span class="stringliteral">&#39;ñ&#39;</span>, <span class="stringliteral">&#39;ò&#39;</span>, <span class="stringliteral">&#39;ó&#39;</span>, <span class="stringliteral">&#39;ô&#39;</span>, <span class="stringliteral">&#39;õ&#39;</span>, <span class="stringliteral">&#39;ö&#39;</span>, <span class="stringliteral">&#39;ø&#39;</span>, <span class="stringliteral">&#39;ù&#39;</span>, <span class="stringliteral">&#39;ú&#39;</span>, <span class="stringliteral">&#39;û&#39;</span>, <span class="stringliteral">&#39;ü&#39;</span>, <span class="stringliteral">&#39;ý&#39;</span>, <span class="stringliteral">&#39;ÿ&#39;</span>, <span class="stringliteral">&#39;Ā&#39;</span>, <span class="stringliteral">&#39;ā&#39;</span>, <span class="stringliteral">&#39;Ă&#39;</span>, <span class="stringliteral">&#39;ă&#39;</span>, <span class="stringliteral">&#39;Ą&#39;</span>, <span class="stringliteral">&#39;ą&#39;</span>, <span class="stringliteral">&#39;Ć&#39;</span>, <span class="stringliteral">&#39;ć&#39;</span>, <span class="stringliteral">&#39;Ĉ&#39;</span>, <span class="stringliteral">&#39;ĉ&#39;</span>, <span class="stringliteral">&#39;Ċ&#39;</span>, <span class="stringliteral">&#39;ċ&#39;</span>, <span class="stringliteral">&#39;Č&#39;</span>, <span class="stringliteral">&#39;č&#39;</span>, <span class="stringliteral">&#39;Ď&#39;</span>, <span class="stringliteral">&#39;ď&#39;</span>, <span class="stringliteral">&#39;Đ&#39;</span>, <span class="stringliteral">&#39;đ&#39;</span>, <span class="stringliteral">&#39;Ē&#39;</span>, <span class="stringliteral">&#39;ē&#39;</span>, <span class="stringliteral">&#39;Ĕ&#39;</span>, <span class="stringliteral">&#39;ĕ&#39;</span>, <span class="stringliteral">&#39;Ė&#39;</span>, <span class="stringliteral">&#39;ė&#39;</span>, <span class="stringliteral">&#39;Ę&#39;</span>, <span class="stringliteral">&#39;ę&#39;</span>, <span class="stringliteral">&#39;Ě&#39;</span>, <span class="stringliteral">&#39;ě&#39;</span>, <span class="stringliteral">&#39;Ĝ&#39;</span>, <span class="stringliteral">&#39;ĝ&#39;</span>, <span class="stringliteral">&#39;Ğ&#39;</span>, <span class="stringliteral">&#39;ğ&#39;</span>, <span class="stringliteral">&#39;Ġ&#39;</span>, <span class="stringliteral">&#39;ġ&#39;</span>, <span class="stringliteral">&#39;Ģ&#39;</span>, <span class="stringliteral">&#39;ģ&#39;</span>, <span class="stringliteral">&#39;Ĥ&#39;</span>, <span class="stringliteral">&#39;ĥ&#39;</span>, <span class="stringliteral">&#39;Ħ&#39;</span>, <span class="stringliteral">&#39;ħ&#39;</span>, <span class="stringliteral">&#39;Ĩ&#39;</span>, <span class="stringliteral">&#39;ĩ&#39;</span>, <span class="stringliteral">&#39;Ī&#39;</span>, <span class="stringliteral">&#39;ī&#39;</span>, <span class="stringliteral">&#39;Ĭ&#39;</span>, <span class="stringliteral">&#39;ĭ&#39;</span>, <span class="stringliteral">&#39;Į&#39;</span>, <span class="stringliteral">&#39;į&#39;</span>, <span class="stringliteral">&#39;İ&#39;</span>, <span class="stringliteral">&#39;ı&#39;</span>, <span class="stringliteral">&#39;Ĳ&#39;</span>, <span class="stringliteral">&#39;ĳ&#39;</span>, <span class="stringliteral">&#39;Ĵ&#39;</span>, <span class="stringliteral">&#39;ĵ&#39;</span>, <span class="stringliteral">&#39;Ķ&#39;</span>, <span class="stringliteral">&#39;ķ&#39;</span>, <span class="stringliteral">&#39;Ĺ&#39;</span>, <span class="stringliteral">&#39;ĺ&#39;</span>, <span class="stringliteral">&#39;Ļ&#39;</span>, <span class="stringliteral">&#39;ļ&#39;</span>, <span class="stringliteral">&#39;Ľ&#39;</span>, <span class="stringliteral">&#39;ľ&#39;</span>, <span class="stringliteral">&#39;Ŀ&#39;</span>, <span class="stringliteral">&#39;ŀ&#39;</span>, <span class="stringliteral">&#39;Ł&#39;</span>, <span class="stringliteral">&#39;ł&#39;</span>, <span class="stringliteral">&#39;Ń&#39;</span>, <span class="stringliteral">&#39;ń&#39;</span>, <span class="stringliteral">&#39;Ņ&#39;</span>, <span class="stringliteral">&#39;ņ&#39;</span>, <span class="stringliteral">&#39;Ň&#39;</span>, <span class="stringliteral">&#39;ň&#39;</span>, <span class="stringliteral">&#39;ŉ&#39;</span>, <span class="stringliteral">&#39;Ō&#39;</span>, <span class="stringliteral">&#39;ō&#39;</span>, <span class="stringliteral">&#39;Ŏ&#39;</span>, <span class="stringliteral">&#39;ŏ&#39;</span>, <span class="stringliteral">&#39;Ő&#39;</span>, <span class="stringliteral">&#39;ő&#39;</span>, <span class="stringliteral">&#39;Œ&#39;</span>, <span class="stringliteral">&#39;œ&#39;</span>, <span class="stringliteral">&#39;Ŕ&#39;</span>, <span class="stringliteral">&#39;ŕ&#39;</span>, <span class="stringliteral">&#39;Ŗ&#39;</span>, <span class="stringliteral">&#39;ŗ&#39;</span>, <span class="stringliteral">&#39;Ř&#39;</span>, <span class="stringliteral">&#39;ř&#39;</span>, <span class="stringliteral">&#39;Ś&#39;</span>, <span class="stringliteral">&#39;ś&#39;</span>, <span class="stringliteral">&#39;Ŝ&#39;</span>, <span class="stringliteral">&#39;ŝ&#39;</span>, <span class="stringliteral">&#39;Ş&#39;</span>, <span class="stringliteral">&#39;ş&#39;</span>, <span class="stringliteral">&#39;Š&#39;</span>, <span class="stringliteral">&#39;š&#39;</span>, <span class="stringliteral">&#39;Ţ&#39;</span>, <span class="stringliteral">&#39;ţ&#39;</span>, <span class="stringliteral">&#39;Ť&#39;</span>, <span class="stringliteral">&#39;ť&#39;</span>, <span class="stringliteral">&#39;Ŧ&#39;</span>, <span class="stringliteral">&#39;ŧ&#39;</span>, <span class="stringliteral">&#39;Ũ&#39;</span>, <span class="stringliteral">&#39;ũ&#39;</span>, <span class="stringliteral">&#39;Ū&#39;</span>, <span class="stringliteral">&#39;ū&#39;</span>, <span class="stringliteral">&#39;Ŭ&#39;</span>, <span class="stringliteral">&#39;ŭ&#39;</span>, <span class="stringliteral">&#39;Ů&#39;</span>, <span class="stringliteral">&#39;ů&#39;</span>, <span class="stringliteral">&#39;Ű&#39;</span>, <span class="stringliteral">&#39;ű&#39;</span>, <span class="stringliteral">&#39;Ų&#39;</span>, <span class="stringliteral">&#39;ų&#39;</span>, <span class="stringliteral">&#39;Ŵ&#39;</span>, <span class="stringliteral">&#39;ŵ&#39;</span>, <span class="stringliteral">&#39;Ŷ&#39;</span>, <span class="stringliteral">&#39;ŷ&#39;</span>, <span class="stringliteral">&#39;Ÿ&#39;</span>, <span class="stringliteral">&#39;Ź&#39;</span>, <span class="stringliteral">&#39;ź&#39;</span>, <span class="stringliteral">&#39;Ż&#39;</span>, <span class="stringliteral">&#39;ż&#39;</span>, <span class="stringliteral">&#39;Ž&#39;</span>, <span class="stringliteral">&#39;ž&#39;</span>, <span class="stringliteral">&#39;ſ&#39;</span>, <span class="stringliteral">&#39;ƒ&#39;</span>, <span class="stringliteral">&#39;Ơ&#39;</span>, <span class="stringliteral">&#39;ơ&#39;</span>, <span class="stringliteral">&#39;Ư&#39;</span>, <span class="stringliteral">&#39;ư&#39;</span>, <span class="stringliteral">&#39;Ǎ&#39;</span>, <span class="stringliteral">&#39;ǎ&#39;</span>, <span class="stringliteral">&#39;Ǐ&#39;</span>, <span class="stringliteral">&#39;ǐ&#39;</span>, <span class="stringliteral">&#39;Ǒ&#39;</span>, <span class="stringliteral">&#39;ǒ&#39;</span>, <span class="stringliteral">&#39;Ǔ&#39;</span>, <span class="stringliteral">&#39;ǔ&#39;</span>, <span class="stringliteral">&#39;Ǖ&#39;</span>, <span class="stringliteral">&#39;ǖ&#39;</span>, <span class="stringliteral">&#39;Ǘ&#39;</span>, <span class="stringliteral">&#39;ǘ&#39;</span>, <span class="stringliteral">&#39;Ǚ&#39;</span>, <span class="stringliteral">&#39;ǚ&#39;</span>, <span class="stringliteral">&#39;Ǜ&#39;</span>, <span class="stringliteral">&#39;ǜ&#39;</span>, <span class="stringliteral">&#39;Ǻ&#39;</span>, <span class="stringliteral">&#39;ǻ&#39;</span>, <span class="stringliteral">&#39;Ǽ&#39;</span>, <span class="stringliteral">&#39;ǽ&#39;</span>, <span class="stringliteral">&#39;Ǿ&#39;</span>, <span class="stringliteral">&#39;ǿ&#39;</span>, <span class="stringliteral">&#39;Ά&#39;</span>, <span class="stringliteral">&#39;ά&#39;</span>, <span class="stringliteral">&#39;Έ&#39;</span>, <span class="stringliteral">&#39;έ&#39;</span>, <span class="stringliteral">&#39;Ό&#39;</span>, <span class="stringliteral">&#39;ό&#39;</span>, <span class="stringliteral">&#39;Ώ&#39;</span>, <span class="stringliteral">&#39;ώ&#39;</span>, <span class="stringliteral">&#39;Ί&#39;</span>, <span class="stringliteral">&#39;ί&#39;</span>, <span class="stringliteral">&#39;ϊ&#39;</span>, <span class="stringliteral">&#39;ΐ&#39;</span>, <span class="stringliteral">&#39;Ύ&#39;</span>, <span class="stringliteral">&#39;ύ&#39;</span>, <span class="stringliteral">&#39;ϋ&#39;</span>, <span class="stringliteral">&#39;ΰ&#39;</span>, <span class="stringliteral">&#39;Ή&#39;</span>, <span class="stringliteral">&#39;ή&#39;</span>);</div>
<div class="line">        $b = array(<span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="stringliteral">&#39;AE&#39;</span>, <span class="charliteral">&#39;C&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;D&#39;</span>, <span class="charliteral">&#39;N&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;Y&#39;</span>, <span class="charliteral">&#39;s&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="stringliteral">&#39;ae&#39;</span>, <span class="charliteral">&#39;c&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;n&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;y&#39;</span>, <span class="charliteral">&#39;y&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;C&#39;</span>, <span class="charliteral">&#39;c&#39;</span>, <span class="charliteral">&#39;C&#39;</span>, <span class="charliteral">&#39;c&#39;</span>, <span class="charliteral">&#39;C&#39;</span>, <span class="charliteral">&#39;c&#39;</span>, <span class="charliteral">&#39;C&#39;</span>, <span class="charliteral">&#39;c&#39;</span>, <span class="charliteral">&#39;D&#39;</span>, <span class="charliteral">&#39;d&#39;</span>, <span class="charliteral">&#39;D&#39;</span>, <span class="charliteral">&#39;d&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;E&#39;</span>, <span class="charliteral">&#39;e&#39;</span>, <span class="charliteral">&#39;G&#39;</span>, <span class="charliteral">&#39;g&#39;</span>, <span class="charliteral">&#39;G&#39;</span>, <span class="charliteral">&#39;g&#39;</span>, <span class="charliteral">&#39;G&#39;</span>, <span class="charliteral">&#39;g&#39;</span>, <span class="charliteral">&#39;G&#39;</span>, <span class="charliteral">&#39;g&#39;</span>, <span class="charliteral">&#39;H&#39;</span>, <span class="charliteral">&#39;h&#39;</span>, <span class="charliteral">&#39;H&#39;</span>, <span class="charliteral">&#39;h&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="stringliteral">&#39;IJ&#39;</span>, <span class="stringliteral">&#39;ij&#39;</span>, <span class="charliteral">&#39;J&#39;</span>, <span class="charliteral">&#39;j&#39;</span>, <span class="charliteral">&#39;K&#39;</span>, <span class="charliteral">&#39;k&#39;</span>, <span class="charliteral">&#39;L&#39;</span>, <span class="charliteral">&#39;l&#39;</span>, <span class="charliteral">&#39;L&#39;</span>, <span class="charliteral">&#39;l&#39;</span>, <span class="charliteral">&#39;L&#39;</span>, <span class="charliteral">&#39;l&#39;</span>, <span class="charliteral">&#39;L&#39;</span>, <span class="charliteral">&#39;l&#39;</span>, <span class="charliteral">&#39;l&#39;</span>, <span class="charliteral">&#39;l&#39;</span>, <span class="charliteral">&#39;N&#39;</span>, <span class="charliteral">&#39;n&#39;</span>, <span class="charliteral">&#39;N&#39;</span>, <span class="charliteral">&#39;n&#39;</span>, <span class="charliteral">&#39;N&#39;</span>, <span class="charliteral">&#39;n&#39;</span>, <span class="charliteral">&#39;n&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="stringliteral">&#39;OE&#39;</span>, <span class="stringliteral">&#39;oe&#39;</span>, <span class="charliteral">&#39;R&#39;</span>, <span class="charliteral">&#39;r&#39;</span>, <span class="charliteral">&#39;R&#39;</span>, <span class="charliteral">&#39;r&#39;</span>, <span class="charliteral">&#39;R&#39;</span>, <span class="charliteral">&#39;r&#39;</span>, <span class="charliteral">&#39;S&#39;</span>, <span class="charliteral">&#39;s&#39;</span>, <span class="charliteral">&#39;S&#39;</span>, <span class="charliteral">&#39;s&#39;</span>, <span class="charliteral">&#39;S&#39;</span>, <span class="charliteral">&#39;s&#39;</span>, <span class="charliteral">&#39;S&#39;</span>, <span class="charliteral">&#39;s&#39;</span>, <span class="charliteral">&#39;T&#39;</span>, <span class="charliteral">&#39;t&#39;</span>, <span class="charliteral">&#39;T&#39;</span>, <span class="charliteral">&#39;t&#39;</span>, <span class="charliteral">&#39;T&#39;</span>, <span class="charliteral">&#39;t&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;W&#39;</span>, <span class="charliteral">&#39;w&#39;</span>, <span class="charliteral">&#39;Y&#39;</span>, <span class="charliteral">&#39;y&#39;</span>, <span class="charliteral">&#39;Y&#39;</span>, <span class="charliteral">&#39;Z&#39;</span>, <span class="charliteral">&#39;z&#39;</span>, <span class="charliteral">&#39;Z&#39;</span>, <span class="charliteral">&#39;z&#39;</span>, <span class="charliteral">&#39;Z&#39;</span>, <span class="charliteral">&#39;z&#39;</span>, <span class="charliteral">&#39;s&#39;</span>, <span class="charliteral">&#39;f&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="charliteral">&#39;I&#39;</span>, <span class="charliteral">&#39;i&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;U&#39;</span>, <span class="charliteral">&#39;u&#39;</span>, <span class="charliteral">&#39;A&#39;</span>, <span class="charliteral">&#39;a&#39;</span>, <span class="stringliteral">&#39;AE&#39;</span>, <span class="stringliteral">&#39;ae&#39;</span>, <span class="charliteral">&#39;O&#39;</span>, <span class="charliteral">&#39;o&#39;</span>, <span class="stringliteral">&#39;Α&#39;</span>, <span class="stringliteral">&#39;α&#39;</span>, <span class="stringliteral">&#39;Ε&#39;</span>, <span class="stringliteral">&#39;ε&#39;</span>, <span class="stringliteral">&#39;Ο&#39;</span>, <span class="stringliteral">&#39;ο&#39;</span>, <span class="stringliteral">&#39;Ω&#39;</span>, <span class="stringliteral">&#39;ω&#39;</span>, <span class="stringliteral">&#39;Ι&#39;</span>, <span class="stringliteral">&#39;ι&#39;</span>, <span class="stringliteral">&#39;ι&#39;</span>, <span class="stringliteral">&#39;ι&#39;</span>, <span class="stringliteral">&#39;Υ&#39;</span>, <span class="stringliteral">&#39;υ&#39;</span>, <span class="stringliteral">&#39;υ&#39;</span>, <span class="stringliteral">&#39;υ&#39;</span>, <span class="stringliteral">&#39;Η&#39;</span>, <span class="stringliteral">&#39;η&#39;</span>);</div>
<div class="line">        <span class="keywordflow">return</span> str_replace($a, $b, $str);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="adef31fd3c624e3d6eadcc5a15a682969"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sanitize_url </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$url_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$remove_accents</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$convert_to_lower_case</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$replace_space_between_words_with_dash</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"></td><td class="paramname">$url</td><td></td></tr>
    <tr><td class="paramtype"></td><td class="paramname">$url_length</td><td></td></tr>
    <tr><td class="paramtype">bool</td><td class="paramname">$remove_accents</td><td></td></tr>
    <tr><td class="paramtype">bool</td><td class="paramname">$convert_to_lower_case</td><td></td></tr>
    <tr><td class="paramtype">bool</td><td class="paramname">$replace_space_between_words_with_dash</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>mixed|string </dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00281">281</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../d0/d3d/ajax__new__page_8php_source.html#l00059">$convert_to_lower_case</a>, <a class="el" href="../../d0/d3d/ajax__new__page_8php_source.html#l00058">$remove_accents</a>, <a class="el" href="../../d0/d3d/ajax__new__page_8php_source.html#l00060">$replace_space_between_words_with_dash</a>, <a class="el" href="../../db/ded/ajax__user_8php_source.html#l00037">$url</a>, <a class="el" href="../../d0/d3d/ajax__new__page_8php_source.html#l00057">$url_length</a>, and <a class="el" href="../../d8/dfd/utils_8php_source.html#l00267">removeAccents()</a>.</p>
<div class="fragment"><div class="line">                                                                                         {</div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = trim(<a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>);</div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = preg_replace(<span class="stringliteral">&#39;/\-+/&#39;</span>, <span class="charliteral">&#39;-&#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>); <span class="comment">//replace multiple dashes with one</span></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = preg_replace(<span class="stringliteral">&#39;/\s+/&#39;</span>, <span class="charliteral">&#39; &#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>); <span class="comment">//replace multiple spaces with one</span></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = preg_replace(<span class="stringliteral">&#39;/_+/&#39;</span>, <span class="charliteral">&#39;.&#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>); <span class="comment">//replace multiple underscore with one</span></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = preg_replace(<span class="stringliteral">&#39;/\/+/&#39;</span>, <span class="charliteral">&#39;/&#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>); <span class="comment">//replace multiple slashes with one</span></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = preg_replace(<span class="stringliteral">&#39;/\:+/&#39;</span>, <span class="charliteral">&#39;:&#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>); <span class="comment">//replace multiple colon with one</span></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = preg_replace(<span class="stringliteral">&#39;/\.+/&#39;</span>, <span class="charliteral">&#39;.&#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>); <span class="comment">//replace multiple dots with one</span></div>
<div class="line"></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = <a class="code" href="../../d0/d3d/ajax__new__page_8php.html#a4051266b6103672dbb03140aec5e9994">$remove_accents</a> ? <a class="code" href="../../d8/dfd/utils_8php.html#a3cdfd9f7d63c5ea6dcb7508a7884ef84">removeAccents</a>(<a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>) : <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>; <span class="comment">// remove accented characters</span></div>
<div class="line"></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = <a class="code" href="../../d0/d3d/ajax__new__page_8php.html#a857d1c9b34992f955185d20c3241fd87">$convert_to_lower_case</a> ? mb_strtolower(<a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>) : <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>; <span class="comment">// convert to lower case</span></div>
<div class="line"></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = <a class="code" href="../../d0/d3d/ajax__new__page_8php.html#ad98f1b0945b0e29c316b69e1ff69db92">$replace_space_between_words_with_dash</a> ? preg_replace(<span class="stringliteral">&#39;/ /&#39;</span>, <span class="charliteral">&#39;-&#39;</span>, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>) : <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>; <span class="comment">//replace space between words with dash</span></div>
<div class="line"></div>
<div class="line">        <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a> = mb_substr(<a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>, 0, <a class="code" href="../../d0/d3d/ajax__new__page_8php.html#a8ef64a2308933589ceeeb75b95cb02b7">$url_length</a>); <span class="comment">// truncate to max length</span></div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac8824e380dac56ae7d19339d11b5d4ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tz_list </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Timezones list with GMT offset</p>
<dl class="section return"><dt>Returns</dt><dd>array <a class="el" href="../../">http://stackoverflow.com/a/9328760</a></dd></dl>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00177">177</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>
<div class="fragment"><div class="line">                   {</div>
<div class="line">        $zones_array = array();</div>
<div class="line">        $timestamp = time();</div>
<div class="line">        <span class="keywordflow">foreach</span>(timezone_identifiers_list() as $key =&gt; $zone) {</div>
<div class="line">                date_default_timezone_set($zone);</div>
<div class="line">                $zones_array[$key][<span class="stringliteral">&#39;zone&#39;</span>] = $zone;</div>
<div class="line">                $zones_array[$key][<span class="stringliteral">&#39;diff_from_GMT&#39;</span>] = <span class="stringliteral">&#39;UTC/GMT &#39;</span> . date(<span class="charliteral">&#39;P&#39;</span>, $timestamp);</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> $zones_array;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="adc3d2aaaf8242b0db6211c72e955b7c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">valid_url </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_regex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str_regex_php_legacy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check for valid URL</p>
<p>preg_match  (unicode word characters) does not work with php &lt; 5.3.10</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$url</td><td></td></tr>
    <tr><td class="paramname">$str_regex</td><td></td></tr>
    <tr><td class="paramname">$str_regex_php_legacy</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool</dd></dl>
<p><a class="el" href="../../">http://stackoverflow.com/questions/8915713/php5-3-preg-match-with-umlaute-utf-8-modifier</a></p>

<p>Definition at line <a class="el" href="../../d8/dfd/utils_8php_source.html#l00317">317</a> of file <a class="el" href="../../d8/dfd/utils_8php_source.html">utils.php</a>.</p>

<p>References <a class="el" href="../../db/d3f/ajax__addnew__page__version_8php_source.html#l00031">$res</a>, and <a class="el" href="../../db/ded/ajax__user_8php_source.html#l00037">$url</a>.</p>
<div class="fragment"><div class="line">                                                            {</div>
<div class="line">        <a class="code" href="../../db/d3f/ajax__addnew__page__version_8php.html#a49a8a4009b02e49717caa88b128affc5">$res</a> = <span class="keyword">true</span>;</div>
<div class="line">        <span class="keywordflow">if</span>(version_compare(phpversion(), <span class="stringliteral">&#39;5.3.10&#39;</span>, <span class="stringliteral">&#39;ge&#39;</span>)) {</div>
<div class="line">                <a class="code" href="../../db/d3f/ajax__addnew__page__version_8php.html#a49a8a4009b02e49717caa88b128affc5">$res</a> = preg_match($str_regex, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>) ? <span class="keyword">false</span> : <span class="keyword">true</span>;</div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">                <a class="code" href="../../db/d3f/ajax__addnew__page__version_8php.html#a49a8a4009b02e49717caa88b128affc5">$res</a> = preg_match($str_regex_php_legacy, <a class="code" href="../../db/ded/ajax__user_8php.html#acf215f34a917d014776ce684a9ee8909">$url</a>) ? <span class="keyword">false</span> : <span class="keyword">true</span>;</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="../../db/d3f/ajax__addnew__page__version_8php.html#a49a8a4009b02e49717caa88b128affc5">$res</a>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_d422163b96683743ed3963d4aac17747.html">app</a></li><li class="navelem"><a class="el" href="../../dir_4a9513260508d5894bea9849c69369f8.html">common</a></li><li class="navelem"><a class="el" href="../../d8/dfd/utils_8php.html">utils.php</a></li>
    <li class="footer">Generated on Fri Aug 31 2012 22:06:31 for Tolc by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
